<?

//Data loading
$SQL = "SELECT distinct(nobkt),vat FROM $DBProcess.view_faktur_no WHERE nobkt >= '".GetParam("fromTransNo","")."' AND nobkt<='".GetParam("toTransNo","")."' AND curr='".GetParam("curr","")."' order by nobkt ";
//die($SQL);
$MyResults = $DBConnection->dbc->get_results($SQL,ARRAY_A);
$MyResults = "a";
if ($MyResults) {
  $Curr = GetParam("curr","");
  if ($Curr=="IDR") {
  	if (ereg("KW",GetParam("fromTransNo",""))) {
  			$Mode = "KW";
        include("ais_report_receipt_entry_tax_idr.php");
    } else {
    	  $Mode = "ND";
    		include("ais_report_dn_tax_idr.php");
    }
  } else {
  	if (ereg("KW",GetParam("fromTransNo",""))) {
  		  $Mode = "KW";
        include("ais_report_receipt_entry_tax_usd.php");
    } else {
    	  $Mode = "ND";
        include("ais_report_dn_tax_usd.php");
    }
  }
	$pdf=new PDFReport("P","mm","Letter");
  foreach($MyResults as $row) {

  	if ($Mode=="KW") {
      $_GET["nokwit"]=$row["nobkt"];
  	} else {
  		$_GET["nobkt"]=$row["nobkt"];
    }
		$pdf->AddPage();
		$Result = GridList ();
		$pdf->GridTable($Result);
  }
	$pdf->Output();      
}


?>
